import { createApp} from 'vue'
import { createPinia } from 'pinia'
import './style.css'
import App from './App.vue'
// import Vue from 'vue'
import ElementPlus from 'element-plus'
import * as echarts from 'echarts'
import router from './router'
import 'element-plus/dist/index.css'

// const App = {
//     setup() {
//        let num = ref(123)
//        console.log(num)
//         function addNum() {
//             num.value += 1
//         }
//         let flag = ref(true)
//         setTimeout(() => {
//             flag.value = false
//         }, 2000);
//         return {
//             flag,
//             num,
//             addNum
//         }
//     },
//     render(proxy) {
//         return this.flag ? h('div', {onClick: this.addNum, style: { color: 'red'}}, `${proxy.num}`) : h('span', {onClick: this.addNum, style: { color: 'red'}}, `hello world`)
//     }
// }

const pinia = createPinia()
const app = createApp(App)
console.log('app-----',app)
app.config.globalProperties.$echarts = echarts
app.use(router)
app.use(pinia)
// app.use(store)
// app.use(echarts)
app.use(ElementPlus)
app.mount('#app')
